/**
 * 根据select标签的document对象获取label
 * @param {Object} obj
 */
function getSelectLabelByDomcumentObject(obj) {
    let label;
    for (let i = 0; i < obj.length; i++) {
        let option = obj[i];
        if (option.value == obj.value) {
            label = option.label;
        }
    }
    return label;
}

/**
 * 移除数组的指定元素
 * @param array
 * @param item
 */
function removeItemFromArray(array, item) {
    for (let i = 0; i < array.length; i++) {
        if (array[i] === item) {
            array.splice(i, 1);
        }
    }
}

class Log {
}

Log.logLevel = "debug";
Log.debug = function (message) {
    if (Log.logLevel === "debug") {
        console.log(message);
    }
}

Log.info = function (message) {
    console.log(message);
}
